package org.enate.bloatterrorist;

import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;

public final class ActionItem {
	// Main
		protected static ActionItem action_title, action_launch, action_freeze, action_defrost, action_manage, action_buildevent, action_buildfilter;
	// Preferences
		protected static ActionItem action_pref_gvi_pressaction_launch, action_pref_gvi_pressaction_showqa, action_pref_filterpref_ime_show, action_pref_filterpref_ime_hide;
		
		
	private Drawable icon;
	private Bitmap thumb;
	private String title;
	private int actionId = -1;
    private boolean selected;
    private boolean sticky;
	
    protected static void build_APF_AI() {
		action_title		= new ActionItem(API.int_action_title, "", null);
		action_launch 		= new ActionItem(API.int_action_launch, "Launch", Main.c.getResources().getDrawable(R.drawable.popup_lightning));
    	action_freeze 		= new ActionItem(API.int_action_freeze, "Freeze", Main.c.getResources().getDrawable(R.drawable.popup_lock));
    	action_defrost 		= new ActionItem(API.int_action_defrost, "Defrost", Main.c.getResources().getDrawable(R.drawable.popup_unlock));
    	action_manage		= new ActionItem(API.int_action_manage, "Manage", Main.c.getResources().getDrawable(R.drawable.popup_lightbulb));
    	action_buildevent	= new ActionItem(API.int_action_buildevent, "Build Event", Main.c.getResources().getDrawable(R.drawable.popup_star));
    	action_buildfilter	= new ActionItem(API.int_action_buildfilter, "Build Filter", Main.c.getResources().getDrawable(R.drawable.popup_search));	
    }
    
    protected static void build_PF_AI() {
    	action_title					= new ActionItem(API.int_action_title, "", null);
    	action_pref_gvi_pressaction_launch 	= new ActionItem(API.int_action_pref_gvi_pressaction_launch, "Launch app", Main.c.getResources().getDrawable(R.drawable.popup_lightning));
    	action_pref_gvi_pressaction_showqa 	= new ActionItem(API.int_action_pref_gvi_pressaction_showqa, "Show menu", Main.c.getResources().getDrawable(R.drawable.popup_lightning));
    	
    	action_pref_filterpref_ime_show = new ActionItem(API.int_action_pref_gvi_pressaction_showqa, "Show keypad in filter", Main.c.getResources().getDrawable(R.drawable.popup_lightning));
    	action_pref_filterpref_ime_hide	= new ActionItem(API.int_action_pref_gvi_pressaction_showqa, "Let me tap the text field", Main.c.getResources().getDrawable(R.drawable.popup_lightning));
    }
    
    
    protected ActionItem(int actionId, String title, Drawable icon) {
        this.title = title;
        this.icon = icon;
        this.actionId = actionId;
    }
    protected ActionItem() {this(-1, null, null);}
    protected ActionItem(int actionId, String title) {this(actionId, title, null);}
    protected ActionItem(Drawable icon) {this(-1, null, icon);}
    protected ActionItem(int actionId, Drawable icon) {this(actionId, null, icon);}
    protected void setTitle(String title) {this.title = title;}
	protected String getTitle() {return this.title;}
	protected void setIcon(Drawable icon) {this.icon = icon;}
	protected Drawable getIcon() {return this.icon;}
	protected void setActionId(int actionId) {this.actionId = actionId;}
	protected int getActionId() {return actionId;}
    protected void setSticky(boolean sticky) {this.sticky = sticky;}
    protected boolean isSticky() {return sticky;}
    protected void setSelected(boolean selected) {this.selected = selected;}
    protected boolean isSelected() {return this.selected;}
    protected void setThumb(Bitmap thumb) {this.thumb = thumb;}
    protected Bitmap getThumb() {return this.thumb;}
}